<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Benchmark: how fast is creating *one* DOM node?</title>
    <script type="text/javascript" src="benchmarker.js"></script>
    <script type="text/javascript">
/* <![CDATA[ */
new Benchmarker({
    createElement: function() {
      this.wrap.appendChild(document.createElement('div'));
    },
    cloneNode: function() {
      this.wrap.appendChild(this.refDIV.cloneNode(false));
    },
    cloneNodeDeep: function() {
      this.wrap.appendChild(this.refDIV.cloneNode(true));
    },
    innerHTML: function() {
      this.wrap.innerHTML = '<div></div>';
    }
},
{
  atStart: function() {
    this.wrap = $T('div', document.body);
    this.refDIV = $T('div', this.wrap);
  },
  afterTest: function() {
    this.wrap.innerHTML = '';
  },
  atFinish: function() {
    this.wrap.remove();
  }
});
/* ]]> */
    </script>
  </head>
  <body>
  </body>
</html>
